---
--- Created by admin.
--- DateTime: 2017/10/4 16:35
---



TongYong={};


TongYong.gongGaoUI=function()
    x, y = findMultiColorInRegionFuzzy(0xfee34b,"0|-18|0x180402,-17|0|0x180402,-3|19|0x180402,19|0|0x180402,-329|1|0xc42016,-294|-14|0xc31f15,-336|-13|0x7a0c08,-382|-34|0x790d0a,-286|-17|0xbe1c14,-354|-34|0xfefe8a,-366|-23|0xfefe76,-351|-14|0xfee258,-329|-28|0xfefe7e,-313|-28|0xfefe7c,-278|-5|0xfeb939,-215|-5|0xfed047,-239|-16|0xfef164,-289|-12|0xc31f16", 95, 222, 207, 708, 377, 0, 0)
    if x > -1 then
        logger.info("公告界面")
        return true
    end
end

TongYong.gongGaoUIClose=function()
    x, y = findMultiColorInRegionFuzzy(0xfee34b,"0|-18|0x180402,-17|0|0x180402,-3|19|0x180402,19|0|0x180402,-329|1|0xc42016,-294|-14|0xc31f15,-336|-13|0x7a0c08,-382|-34|0x790d0a,-286|-17|0xbe1c14,-354|-34|0xfefe8a,-366|-23|0xfefe76,-351|-14|0xfee258,-329|-28|0xfefe7e,-313|-28|0xfefe7c,-278|-5|0xfeb939,-215|-5|0xfed047,-239|-16|0xfef164,-289|-12|0xc31f16", 95, 222, 207, 708, 377, 0, 0)
    if x > -1 then
        shouzhi.click(x, y)
        logger.info("公告界面关闭")
        return true
    end
end


TongYong.tiShiQuYu=function()
    jiaoChengHUD1 = createHUD()     --创建一个HUD
    showHUD(jiaoChengHUD1, "安全区域", fenBianLv.devToRun_x(23), "0xff980003", "0xff00A005", 0, 0, 0, 720, 40)      --显示HUD内容

    jiaoChengHUD2 = createHUD()     --创建一个HUD
    showHUD(jiaoChengHUD2, "安全区域", fenBianLv.devToRun_x(38), "0xff980003", "0xff00A005", 0, 0, 160, 90, 160)     --变更显示的HUD内容

    jiaoChengHUD3 = createHUD()     --创建一个HUD
    showHUD(jiaoChengHUD3, "警告区域", fenBianLv.devToRun_x(38), "0xff0017FF", "0xffFFE800", 0, 650, 650, 90, 120)     --变更显示的HUD内容

    jiaoChengHUD4 = createHUD()     --创建一个HUD
    showHUD(jiaoChengHUD4, "禁止区域", fenBianLv.devToRun_x(20), "0xff00C1FF", "0xff980003", 0, 0, 320, 110, 50)     --变更显示的HUD内容
end

TongYong.tiShiQuYuClose=function()
        hideHUD(jiaoChengHUD1)     --隐藏HUD
        hideHUD(jiaoChengHUD2)     --隐藏HUD
        hideHUD(jiaoChengHUD3)     --隐藏HUD
        hideHUD(jiaoChengHUD4)     --隐藏HUD
end

TongYong.wangLuoError=function()
    x, y = findMultiColorInRegionFuzzy(0xad8966,"-104|-152|0xcdad8a,347|-143|0xcdad8a,299|-152|0xcdad8a,370|-100|0xcdad8a,167|74|0xcdad8a,4|-12|0xc0a07e,116|-19|0xcaae8c,7|17|0xa17956,111|12|0xa17956,44|-1|0x4b2510,70|-3|0x4d2612,79|-7|0x4d2813", 95, 14, 476, 701, 805, 0, 0)

    if x==-1 then
        x, y = findMultiColorInRegionFuzzy(0xb28e6c,"-16|-18|0xceb291,29|-16|0xccb08e,47|-5|0xbb9b79,51|17|0xa17956,4|17|0xa17956,-22|17|0xa17956,-47|16|0xa17956,-15|-1|0x4d2612,-25|0|0x4c2610,-15|-1|0x4d2612,-10|0|0x4b2510,-7|-8|0x4b2510,-4|4|0x4c2610,17|2|0x4d2712,17|-8|0x4c2611,12|4|0x4b2510,27|9|0x4b2510,26|-6|0x4d2813", 90, 273, 633, 475, 735, 0, 0)

    end
    if x > -1 then
        shouzhi.click(x, y)
        logger.info("网络异常")
        return true
    end
end